home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / dbapg.arc / DOS-PATH.PRG < prev    next >
Encoding:
Text File  |  1984-08-12  |  1.6 KB  |  54 lines

  1. * Program.: DOS-PATH.PRG
  2. * Author..: Kelly Mc Tiernan
  3. * Date....: 01/22/84
  4. * Notice..: Copyright 1984, Kelly Mc Tiernan, All Rights Reserved.
  5. * Version.: dBASE II, version 2.4
  6. * Notes...: Accessing DOS 2.0 directories from within dBASE II.
  7. *
  8. *    IN: path-C-63       Parameter containing DOS 2.0 pathname.
  9. *        command-C-2     Parameter containing DOS 2.0 directory
  10. *                        command [MD,RD,CD].
  11. *   OUT: is:error-L-1    Validation flag.
  12. *
  13. STORE T TO is:error
  14. * ---Parameter checking.
  15. STORE !(path) TO path
  16. STORE !(command) TO command
  17. IF LEN(path) > 63
  18.    * ---DOS 2.0 does not allow paths over 63 chars.
  19.    RETURN
  20. ENDIF
  21. SET CALL TO 56832
  22. * -----------0---1---2---3---4---5---6---7---8---9
  23. POKE 56832,         83,156,137, 38, 61,222,138, 15
  24. POKE 56840,181, 00, 67,186, 63,222,137,215,137,222,;
  25.            252,243,164,198, 05, 00,180, 00,205, 33
  26. * ---This byte receives a parameter------^
  27. POKE 56860,114, 07,139, 38, 61,222,157, 91,195, 75,;
  28.            138, 15,181, 00, 67, 73,198, 07, 69, 67
  29. POKE 56880,137,223,176, 32,243,170,139, 38, 61,222,;
  30.            157, 91,195
  31. * -----------0---1---2---3---4---5---6---7---8---9
  32. DO CASE
  33.    CASE command="MD"
  34.    * ---Make directory.
  35.       POKE 56857, 57
  36.    CASE command="RD"
  37.    * ---Remove directory.
  38.       POKE 56857, 58
  39.    CASE command="CD"
  40.    * ---Change directory.
  41.       POKE 56857, 59
  42.    OTHERWISE
  43.       * ---Not a directory command.
  44.       RETURN
  45. ENDCASE
  46. * ---Execute the routine.
  47. CALL path
  48. IF $(path,1,2) <> "E "
  49.    * ---NO OPERATION ERROR.
  50.    STORE F TO is:error
  51. ENDIF
  52. RETURN
  53. * EOF: DOS-PATH.PRG
  54.